<?php
namespace Apps\Front\Controllers;
use Phalcon\Mvc\Controller;
use  Apps\Model\Mycw;
use  Apps\Model\Area;
use  Apps\Model\Cangwei;
use  Apps\Model\Trans;
use  Apps\Model\Usercwnum;


class CangweinumController extends Controller{

    public function ximaAction(){
    	
    	$area=Area::findFirst("area_name='西马'");
        $area_id=$area->id;
        $user_id=$this->session->get("operator")->id;
    	$usercwnum=Usercwnum::find("area_id=$area_id and user_id=$user_id");
    	$this->view->setvar("usercwnum",$usercwnum);	        //$this->view->disable();
	    }

	public function dongmaAction(){
    	
    	$area=Area::findFirst("area_name='东马'");
        $area_id=$area->id;
        $user_id=$this->session->get("operator")->id;
    	$usercwnum=Usercwnum::find("area_id=$area_id and user_id=$user_id");
    	$this->view->setvar("usercwnum",$usercwnum);	        //$this->view->disable();
	    }

    public function SingaporeAction(){
        
        $area=Area::findFirst("area_name='新加坡'");
        $area_id=$area->id;
        $user_id=$this->session->get("operator")->id;
        $usercwnum=Usercwnum::find("area_id=$area_id and user_id=$user_id");
        $this->view->setvar("usercwnum",$usercwnum);            //$this->view->disable();
        }

        
     public function ThailandAction(){
        
        $area=Area::findFirst("area_name='泰国'");
        $area_id=$area->id;
        $user_id=$this->session->get("operator")->id;
        $usercwnum=Usercwnum::find("area_id=$area_id and user_id=$user_id");
        $this->view->setvar("usercwnum",$usercwnum);            //$this->view->disable();
        } 


    public function IndonesiaAction(){
        
        $area=Area::findFirst("area_name='泰国'");
        $area_id=$area->id;
        $user_id=$this->session->get("operator")->id;
        $usercwnum=Usercwnum::find("area_id=$area_id and user_id=$user_id");
        $this->view->setvar("usercwnum",$usercwnum);            //$this->view->disable();
        }   



	    


}
	   


?>